/*
 * Author: vyouzhi <vyouzhi@163.com>
 * http://www.xda.cn
 *
 * File: time_lib.c
 * Create Date: 2011-07-14 10:04:51
 *
 */

#include <time.h>
#include <malloc.h>
#include <string.h>
#include <stdio.h>

char *get_logname(void){
	time_t clocker;
    struct tm *tm;
	char buf[10], bufs[10], *p;

    time(&clocker);
    tm = localtime(&clocker);
    strftime(buf, sizeof(buf), "%Y%W", tm);

	sprintf(bufs, "%s", buf);
	p = (char *)calloc(10, sizeof(char));
	strcpy(p, bufs);
	return p;
}
/* vim: set ts=4 sw=4: */

